package com.sxdx.controller;

import com.sxdx.common.Result;
import com.sxdx.entity.LoginUser;
import com.sxdx.service.ISysUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class LoginController {
    @Resource
    private ISysUserService userService;

    /**
     * 用户登入功能
     * @param user
     * @return
     */
    @PostMapping("/login")
    public Result login(LoginUser user){
        return userService.login(user);
    }


}
